﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
using RIMS.Lib.Manager;
using RIMS.Lib.Models;

namespace RIMS.Web.Utility.CacheUtility
{
    internal class UserCacheUtility : CacheUtility<User>
    {
        public void Init()
        {
            IList<User> users = new UserManager().GetAll();
            SetList(users);
        }


        internal override User Read(Guid guid)
        {
            return All.FirstOrDefault(I => I.OID.Equals(guid));
        }

//        protected override Expression<Func<User, bool>> GetOIDSelector(Guid guid)
//        {
//            throw new NotImplementedException();
//        }
    }
}